package com.njbw.user.designPattern.responsibilityChainPattern;

import lombok.Getter;
import org.apache.commons.collections4.CollectionUtils;

@Getter
public class RuleCheckContext {

    /**
     * 规则检查结果
     */
    private final RuleCheckResult ruleCheckResult = new RuleCheckResult();

    public boolean hasError() {
        return CollectionUtils.isNotEmpty(ruleCheckResult.getFailedMsgList());
    }
}
